package springtest;

import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.data.mongodb.core.MongoTemplate;

/**
 * @author chenzhiqiang
 * @date 2018-03-02 14:41:29
 */
@Configuration
@ConfigurationProperties(prefix = "spring.data.mongodb.oplog")
public class OplogMongoConfigure extends AbstractMongoConfigure {

	@Bean(name = "oplogMongoTemplate")
	public MongoTemplate getMongoTemplate() throws Exception {
		return new MongoTemplate(mongoDbFactory());
	}

}
